package com.springboot.prac.prac_leecode.lee02;

/**
 * @author : syl
 * @date : 2022/9/6 9:38
 * @desc : 节点
 */
public class ListNode {

    /**
     * 当前节点数据
     */
    private int data;

    /**
     * 下一个节点的引用
     */
    private ListNode next;

    ListNode() {
    }

    ListNode(int data) {
        this.data = data;
    }

    ListNode(int data, ListNode next) {
        this.data = data;
        this.next = next;
    }

    public int getData() {
        return data;
    }

    public void setData(int data) {
        this.data = data;
    }

    public ListNode getNext() {
        return next;
    }

    public void setNext(ListNode next) {
        this.next = next;
    }
}
